change `dest` option on the fly
Posted
by
Rikard
on Stack Overflow
See other posts from Stack Overflow
or by Rikard
Published on 2014-05-31T21:22:22Z
Indexed on
2014/05/31
21:25 UTC
Read the original article
Hit count: 272
I have some grunt tasks to compile files and would like to "recicle" them inside different tasks.
I am trying to modify the destination directory without success... My idea is something like:
grunt.registerTask('bower', ['compile:index', 'compile:core'], function(){
this.options({dest: 'dist/*.js'});
});
The compile:index
task runs good by itself (i.e. when called alone) and has dest: 'index.js
, other tasks have other filenames. I would like to change these inside the bower
task, adding a new directory but keeping the filename defined in the original task.
Is this possible?
© Stack Overflow or respective owner